package com.wk.cart.feign;

import com.wk.cart.entity.Cart;
import com.wk.common.bean.Resp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@FeignClient("cart-service")
@RequestMapping("cart")
public interface CartFeign {

    /**
     * 根据用户ID查询购物车中选中的商品
     */
    @GetMapping("checked/{userId}")
    Resp<List<Cart>> queryCheckedCartByUserId(@PathVariable(value = "userId") Long userId);

}
